<template>
  <div class="dashboard-container app-container">
    <personal-msg v-show="userInfo.role==='doctor'"></personal-msg>
    <personal-performance v-show="userInfo.role==='doctor'"></personal-performance>
    <div v-show="userInfo.role==='admin'">
      <h1>你好！管理员</h1>
      <img style="width: 100%" src="../../assets/arrailBg2.jpg">
    </div>
  </div>
</template>

<script>
import PersonalMsg from './PersonalMsg'
import PersonalPerformance from './PersonalPerformance/index'
import { mapGetters } from 'vuex'

export default {
  name: 'dashboard',
  data() {
    return {
      performanceDate: '',
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now()
        }
      }
    }
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  components: {
    PersonalMsg,
    PersonalPerformance
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
  .performance-date-wrap {
    text-align: right;
    margin: 50px 80px;
  }
</style>
